package com.epam.qanda.i18n;

import java.util.Locale;
import java.util.ResourceBundle;

public class Bundler {
	private static String BASE_NAME = "com.epam.qanda.i18n.message";
	private static ResourceBundle bundler = ResourceBundle.getBundle(BASE_NAME);

	public static ResourceBundle getBundler() {
		return bundler;
	}

	public static void setBundler(ResourceBundle bundler) {
		Bundler.bundler = bundler;
	}

	public static void setBundler(String lang) {
		Locale locale = new Locale(lang);
		ResourceBundle bundler = ResourceBundle.getBundle(BASE_NAME, locale);
		Bundler.setBundler(bundler);
	}
}
